<test>
  <sql>WITH EmployeeHierarchy AS
(
	   -- Base case
	   SELECT	EmployeeID
	   FROM		Employees
	   WHERE	ReportsTo IS NULL

	   UNION ALL

	   -- Recursive step
	   SELECT	TOP 10
				eh.EmployeeID
	   FROM		EmployeeHierarchy eh 
					INNER JOIN Employees e ON e.ReportsTo = eh.EmployeeID
)
SELECT	*
FROM	EmployeeHierarchy
</sql>
  <expectedErrors>
    <expectedError id="CteContainsTop" text="TOP operator is not allowed in the recursive part of a recursive common table expression 'EmployeeHierarchy'." />
  </expectedErrors>
</test>